<?php
header("Content-type:text/html;charset=utf-8");

$index = $_GET["index"];


// 连接数据库
$conn = mysql_connect("localhost","root","root");
if($conn){
	// echo "连接成功";
	
	// 选择数据库
	mysql_select_db("chuanyue");
}

// 数据库查询,针对下标查找它唯一的id那一行的数据，结果只有一条
$result = mysql_query("select * from details where id = $index",$conn);

if(mysql_num_rows($result)){
	while($obj = mysql_fetch_assoc($result)){
		echo $obj["id"];
	}
}


?>